
Partial Class Fixtures
    Inherits System.Web.UI.Page

    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not Page.IsPostBack Then

            'Master.PageTitle = SiteMap.CurrentNode.Title

            Dim clause As String
            If Request.QueryString("type") = "future" Then
                clause = ">="
            Else
                clause = "<"
            End If
            FixtureDateLabel.Text = DateTime.Now().ToString()

            SqlDataSource1.SelectCommand = _
                String.Format("SELECT [FixtureID], [FixtureDate], [FixtureType], [GoalsFor], [GoalsAgainst], [Notes], [Opponents] FROM [Fixtures] WHERE FixtureDate {0} @FixtureDate", clause)
        End If

    End Sub

End Class
